#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @File : search_page.py
# @Autor: FY
# @Date: 2021/8/27
from selenium.webdriver.common.by import By

from studyPageObject2.pages.base_page import BasePage


class SearchPage(BasePage):

    _input_locator = (By.ID, "  ")
    _name_locator=(By.ID, "tips")

    def search(self, keyword):
        self.find_element(self._input_locator).send_keys(keyword)
        self.find_element(self._name_locator).click()

    def get_current_price(self):
        return float(self.driver.find_element().text)